// 引入 request 文件
import request from '@/utils/request'




// 分页查询学习列表
export const pageStudyInfo = (params) => {
    return request({
        url: '/study/studyInfo/page',
        method: 'get',
        data: params
    })
}


// 获取学习列表详细信息
export const studyInfoById= (id) => {
    return request({
        url: '/study/studyInfo/'+id,
        method: 'get',
    })
}

// 增加学习列表
export const saveStudyInfo = (params) => {
    return request({
        url: '/study/studyInfo',
        method: 'post',
        data: params
    })
}

// 修改学习列表
export const updateStudyInfo = (params) => {
    return request({
        url: '/study/studyInfo',
        method: 'put',
        data: params
    })
}

// 删除学习列表
export const deleteStudyInfo = (id) => {
    return request({
        url: '/study/studyInfo/delete?id='+id,
        method: 'delete',
    })
}

// 微信授权登录相关
// async get_openid() {
// 					try {
// 					    const res = await wx.login();
// 					    const code = res.code;
					    
// 					} catch (error) {
// 					    console.error('登录出错:', error);
// 					}
// 				};
export const get_openid = (params) => {
    return request({
        url: '/minisoft/get_openid',
        method: 'get',
        data: params
    })
}